<template>
    <div class="comment-item">
        <div class="user-img">
            <img src="./imgs/users/user1.png">
        </div>
        <div class="user-info">
            <div class="user-name">
                <span>用户名称</span>
                <div class="film-source">
                    <span class="star-img open"></span>
                    <span class="star-img open"></span>
                    <span class="star-img open"></span>
                    <span class="star-img close"></span>
                    <span class="star-img close"></span>
                    <span class="star-source">7.9</span>
                </div>
            </div>
            <div class="user-time">2018年08月30日11:52:24</div>
        </div>
        <div class="user-conent">
        </div>
    </div>
</template>
<script>
    Vue.component("UserComment",{
        template:document.currentScript.ownerDocument.querySelector("template"),
        data() {
            return {
                users:""
            }
        },
        methods: {
            addEvent(){
                this.$root.$on("updateUsers",(arg)=>{
                    console.log("arg")
                    this.users = arg;
                })
            }
        },
        beforeMount() {
            this.addEvent();
        },
    })
</script>